<?php
    $json = $this->json;
    $this->jQuery()
        ->addJavascriptFile($this->baseUrl('/js/jquery.xml2json.js'))
        ->addJavascriptFile('/js/datatables/media/js/jquery.dataTables.min.js')
        ->addStylesheet($this->baseUrl('/js/datatables/media/css/demo_table.css'))
        ->addOnLoad("
            $('#classement').dataTable({
                'bJQueryUI': true,
                'bProcessing': true,
                'bServerSide': true,
                'sAjaxSource': '{$this->smartUrl("classementjson")}'
            });
            
            $('#classement tbody tr').live('click', function(){
                var url = $(this).attr('id');
                window.open(url);
            });
        ");
?>

<table id="classement" width="100%">
    <thead>
        <th>Nom</th>
        <th>Prenom</th>
        <th>licence</th>
        <th>Sexe</th>
        <th>classementSimple</th>
        <th>classementDouble</th>
        <th>classementMixte</th>
    </thead>
    <tbody>
        
    </tbody>
</table>

<div style="display: none;" id="preview">
</div>